<?
        require_once('../../Inc/Global.php');
        require_once('AddressData.php');
        if(isset($_REQUEST['Submit']))
        {
        	$rs = $_REQUEST;
        	if($errors = DeleteAddress($_REQUEST[ID]))
        	{
        		print_r($errors); 
        	}
        	else
        	{ 
        		header("location: http://cs.newpaltz.edu/~N00001387/WebClass/DatabaseProject/AddressMgmt/");
        	}	
        }
        else
        {
        	$rs = GetAddress($_REQUEST['ID']);
        }
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../Main.css" />
<title>Delete Address</title>
</head>
<body>
	<p>
	This is the Delete address screen.  
	</p>
	<form method="post">
		<div>
			Are you sure you want to delete this address? <b><br/><?=$rs['Address_Line1']?> <?=$rs['Address_Line2']?> <br/><?=$rs['City']?>, <?=$rs['State']?> <?=$rs['Zipcode']?></b>
        </div>
        <br/>
        <input type="submit" name="Submit" value="Yes" />
        <input type="button" value="No" onclick="window.location.href='http://cs.newpaltz.edu/~N00001387/WebClass/DatabaseProject/AddressMgmt/'" />
        <!--  We will always get this value to track # of submits -->
    </form>                  
    
   <br />
     <input type="button" value="Go To Home Screen" onclick="window.location.href='http://cs.newpaltz.edu/~N00001387/WebClass/DatabaseProject/'" />
    </body>
</html>

